Pod::Spec.new do |s|
  s.name = "JLFaceService"
  s.version = "0.1.2"
  s.summary = """
  活体检测版本
  当前腾讯云人脸SDK版本为：v6.5.1
  商汤当前版本：v3.16.0 版本
  """
  s.homepage         = 'https://jlpay.com'
  s.license          =  "MIT"
  s.authors = {"lz"=>""}
  s.description = "人脸集成版本"  
  #s.source = { :path => '.' }
  s.source = {  :git => 'https://gitlab.jlpay.com/access-services/common-components/ios-component.git',  :tag => "#{s.name}_v#{s.version}" }

  s.ios.deployment_target    = '9.0'
  s.swift_version = '5.0'

  #腾讯云人脸SDK
  s.subspec 'JLTencentCloudHuiyanSDKFace_framework' do |ss|
    #路径
    ssPath = "JLThirdSupportService/JLThirdSupportService/Classes/JLFaceService/Tecent/"
    #代码文件
    ss.source_files = ssPath +'Classes/*.{h,m,swift}'
    
    ss.frameworks = ["UIKit", "AVFoundation", "MobileCoreServices", "CoreVideo", "Accelerate", "Security", "SystemConfiguration", "CoreMedia", "AudioToolbox", "VideoToolbox", "CoreTelephony", "ImageIO","WebKit"]
    ss.libraries = ["c++","z"]
    #ss.description   = "sdk版本 6.5.1"
    
    ss.subspec 'commonLibs' do |sss|
      sss.ios.vendored_framework = ssPath + 'TencentCloudHuiyanSDKFace_framework/CommonLibs/*.framework'
    end

    ss.subspec 'face' do |sss|
      
      sss.ios.vendored_framework   = ssPath + 'TencentCloudHuiyanSDKFace_framework/Libs/*.framework'
      sss.ios.resource             = ssPath + 'TencentCloudHuiyanSDKFace_framework/Resources/*.bundle'
      sss.dependency "JLFaceService/JLTencentCloudHuiyanSDKFace_framework/commonLibs"
    end
  end

  #商汤SDK版本
  s.subspec 'JLSTLiveness' do |st|

    #路径
    stPath = "JLThirdSupportService/JLThirdSupportService/Classes/JLFaceService/JLSTLiveness/"
    
    st.vendored_libraries = stPath + "STLivenessDetector/libSTLivenessDetector.a"
    st.resources          = stPath + "STLivenessDetector/SenseID_Liveness_Interactive.lic",
                            stPath + "STLivenessDetector/st_liveness_resource.bundle"
                            
    st.framework = ["UIKit"]
    
    st.subspec 'Mananger' do |manager|
      manager.source_files       = stPath + "STLivenessController/*.{h,m}",
                                   stPath + "STLivenessDetector/*.{h,m}",
                                   stPath + "Service/*.{h,m}"
    end

    
  end

end
